package cn.funeralobjects.ams.web.controller;

import cn.funeralobjects.ams.entity.ERamRole;
import cn.funeralobjects.ams.model.RamRole;
import cn.funeralobjects.ams.service.RamRoleService;
import cn.funeralobjects.ams.web.api.RamRoleApi;
import cn.funeralobjects.ams.web.mapper.RamRoleMapper;
import cn.funeralobjects.ams.web.model.MRamRole;
import cn.funeralobjects.ams.web.model.VRamRole;
import cn.funeralobjects.common.service.CommonCloudCrudService;
import cn.funeralobjects.common.web.controller.CommonCloudCrudController;
import cn.funeralobjects.common.web.controller.converter.ModelMapper;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author FuneralObjects
 * Create date: 2020/6/8 10:07 AM
 */
@RestController
@RequestMapping("/ram-role")
public class RamRoleController implements RamRoleApi, CommonCloudCrudController<VRamRole, MRamRole, RamRole, ERamRole, Integer> {

    @Resource
    private RamRoleService ramRoleService;

    @Resource
    private RamRoleMapper ramRoleMapper;

    @Override
    public CommonCloudCrudService<RamRole, ERamRole, Integer> commonCloudCrudService() {
        return ramRoleService;
    }

    @Override
    public ModelMapper<MRamRole, RamRole, ERamRole, VRamRole> modelMapper() {
        return ramRoleMapper;
    }
}
